package com.app.web.front.model;

import com.app.web.BaseModel;
import com.jfinal.plugin.activerecord.Db;

/***
 * 收藏model
 * type ===> ('blog', 'topic')
 * @author Administrator
 *
 */
public class Favorite extends BaseModel<Favorite>{

	private static final long serialVersionUID = 186684748419693891L;
	
	public static final Favorite dao = new Favorite();
	
	public static String TYPE_BLOG = "blog";
	public static String TYPE_TOPIC = "topic";
	
	public int deleteByIds(String ids){
		return Db.update("delete from testModel where id in ("+ids+")");
	}
	
	public int deleteByTypeId(int typeId, String type){
		
		return Db.update("delete from favorite where type_id = ? and type = ?", typeId, type);
	}
}